Astronomers have witnessed the collision of two neutron stars, marking the first observed cosmic event to produce ripples in gravitational waves.